#pragma once
#include<iostream>
#include<fstream>
class Box;
class Sprite;
class StaticObject;
class Bridge;
#include <d3dx9.h>
#include <list>

#include "StaticObject.h"

#include "WallTurret.h"

class Sniper;
class StandSniper;

class DefenseCannon;

class Cannon;

class Boss;

using namespace std;

class Map
{		
	int** _arrMap;
	int _width, _height;
	Sprite* _sMap;

	list<D3DXVECTOR2> _lWallTurret;	

	list<D3DXVECTOR2> _lStandSniper;	

	list<D3DXVECTOR2> _lSniper;	

	list<D3DXVECTOR2> _lCannon;	

	list<D3DXVECTOR2> _lDefenseCannon;	

	list<D3DXVECTOR2> _lBoss;

	list<StaticObject*> _lStaticObj;

	list<D3DXVECTOR2> _lBridge;

	string _objName;
	int _numObj;

public:
	//BlockHouse* _bloc;
	Map();
	~Map(void);
	void readMap(string fileName);
	list<D3DXVECTOR2> readObjectPosition(ifstream* stream);
	void readStaticObject(ifstream* stream, STATIC_ID id);
	void init(SPRITE_ID id);
	void render();	
	void resetMap(int i, int j, int frame);
	list<StaticObject*> getStaticObjects();
	list<Bridge*> getStaticBridge();
	list<WallTurret*> getWallturretList();
	list<StandSniper*> getStandSniperList();
	list<Sniper*> getSniperList();
	list<Cannon*> getCannonList();
	list<DefenseCannon*> getDefenseCanon();
	list<Boss*> getBoss();
	int getWidth();
	int getHeight();
};

